/**
 * 
 * @author Travis C lynch <travisclynch@student.midlandstech.edu>
 * @version Jan 19 2012
 * <br>
 * <br>
 * <b>Instructions</b>
 * <p>
 * <ul>
 * <li>Instantiate 5 25-pound-capacity Boxes and 30 Blobs with weights that are random doubles from 1 to 4 (Math.random()*3+1).
 * <li>30 Blobs with weights that are random doubles from 1 to 4 (Math.random()*3+1).
 * <li>Put the 30 Blobs into the boxes, filling the first box, then the second, etc., and then printing out the contents of each box.
 * </ul>
 * <b>Discription</b>
 * <p>
 * <ul>
 * <li>A Driver Program that Tests the Blob and Box classes and their interface implementations
 * </ul>
 * 
 */
public class Driver {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Box[] boxes = new Box[5];
		int count=0; //counter for boxes
		for(int i=0;i<5;i++){
			boxes[i] = new Box(); //instantiate each box within the boxes array 
		}
		for(int i=0;i<30;i++){
			Blob b = new Blob((Math.random()*3+1)); // Creates a new blob
			if(!(boxes[count].insert(b))){ //trys to incert blob into the box, if fails it moves to the next box.
				count++;
				boxes[count].insert(b);
			}
		}
		for(int i=0;i<5;i++){
			int j=i; //allows SOP to display proper number
			j++;
			System.out.println("Within box "+ j);
			boxes[i].printContents();
		}
	}
}
